# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineMetadata do
  @moduledoc """
  Metadata message of RunPipeline method.

  ## Attributes

  *   `exportToCdwPipelineMetadata` (*type:* `GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineMetadataExportToCdwPipelineMetadata.t`, *default:* `nil`) - The pipeline metadata for Export-to-CDW pipeline.
  *   `failedFileCount` (*type:* `integer()`, *default:* `nil`) - Number of files that have failed at some point in the pipeline.
  *   `gcsIngestPipelineMetadata` (*type:* `GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineMetadataGcsIngestPipelineMetadata.t`, *default:* `nil`) - The pipeline metadata for GcsIngest pipeline.
  *   `individualDocumentStatuses` (*type:* `list(GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineMetadataIndividualDocumentStatus.t)`, *default:* `nil`) - The list of response details of each document.
  *   `processWithDocAiPipelineMetadata` (*type:* `GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineMetadataProcessWithDocAiPipelineMetadata.t`, *default:* `nil`) - The pipeline metadata for Process-with-DocAi pipeline.
  *   `totalFileCount` (*type:* `integer()`, *default:* `nil`) - Number of files that were processed by the pipeline.
  *   `userInfo` (*type:* `GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1UserInfo.t`, *default:* `nil`) - User unique identification and groups information.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :exportToCdwPipelineMetadata =>
            GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineMetadataExportToCdwPipelineMetadata.t()
            | nil,
          :failedFileCount => integer() | nil,
          :gcsIngestPipelineMetadata =>
            GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineMetadataGcsIngestPipelineMetadata.t()
            | nil,
          :individualDocumentStatuses =>
            list(
              GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineMetadataIndividualDocumentStatus.t()
            )
            | nil,
          :processWithDocAiPipelineMetadata =>
            GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineMetadataProcessWithDocAiPipelineMetadata.t()
            | nil,
          :totalFileCount => integer() | nil,
          :userInfo =>
            GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1UserInfo.t() | nil
        }

  field(:exportToCdwPipelineMetadata,
    as:
      GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineMetadataExportToCdwPipelineMetadata
  )

  field(:failedFileCount)

  field(:gcsIngestPipelineMetadata,
    as:
      GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineMetadataGcsIngestPipelineMetadata
  )

  field(:individualDocumentStatuses,
    as:
      GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineMetadataIndividualDocumentStatus,
    type: :list
  )

  field(:processWithDocAiPipelineMetadata,
    as:
      GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineMetadataProcessWithDocAiPipelineMetadata
  )

  field(:totalFileCount)
  field(:userInfo, as: GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1UserInfo)
end

defimpl Poison.Decoder,
  for: GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineMetadata do
  def decode(value, options) do
    GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineMetadata.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineMetadata do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
